import {
  http
} from '@/utils/http.js';


// 获取验证码
export const codeApi = (data) => {
  return http.get('/code', {
    params: data
  })
}

// 手机号验证码登录
export const mobileLoginApi = (data) => {
  return http.post("/login", {
    ...data
  }, {
    header: {
      "Content-Type": "application/json"
    }
  })
}

// 获取用户信息
export const getUserIngfoApi = () => {

  return http.get("/patient/myUser")
}

// 检测绑定状态
export const checkLoginApi = (data) => {
  return http.post('/login/thirdparty', data)
}

// 绑定手机号
export const bindMobileApi = (data) => {
  return http.post('/login/binding', data, {
    header: {
      "Content-Type": "application/json"
    }
  })
}